package com.aizuda.boot.modules.business.permission.domain.response;

import com.aizuda.boot.modules.common.constant.enums.ConditionTypeEnum;
import com.aizuda.boot.modules.common.constant.enums.RelationToParentEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * @Author sangyirong
 * @ClassName RoleDataIsolationConditionDTO
 * @Version 1.0
 * @Date 2025/5/19 15:36
 */
@Data
@Schema(description = "角色数据隔离条件返回对象")
public class RoleDataIsolationConditionShowVO {

    /**
     * 主键
     */
    @Schema(description = "主键")
    private Long id;

    /**
     * 权限id
     */
    @Schema(description = "权限id")
    private Long permissionId;

    /**
     * 字段名称
     */
    @Schema(description = "字段名称")
    private String fieldName;

    /**
     * 条件类型
     */
    @Schema(description = "条件类型")
    private ConditionTypeEnum conditionType;

    /**
     * 字段值
     */
    @Schema(description = "字段值")
    private String fieldValue;

    /**
     * 父条件ID，NULL表示根条件
     */
    @Schema(description = "父条件ID，NULL表示根条件")
    private Integer parentConditionId;

    /**
     * 与父条件的逻辑关系
     */
    @Schema(description = "与父条件的逻辑关系")
    private RelationToParentEnum relationToParent;

    /**
     * 子条件列表
     */
    @Schema(description = "子条件列表")
    private List<RoleDataIsolationConditionShowVO> childConditionList;
}
